import request from '@/utils/request'

export function getTopicOne(id) {
  return request.get('/admin/topic/one/id/' + id)
}
export function getTopicList(params) {
  return request.get('/admin/topic/index', { params })
}
export function createTopic(data) {
  return request.post('/admin/topic/create', data)
}
export function updateTopic(data, id) {
  return request.post('/admin/topic/update/id/' + id, data)
}
export function deleteTopic(id) {
  return request.get('/admin/topic/remove', { params: { id }})
}


//专栏关联视频列表
export function videoList(id) {
  return request.get('/admin/topic/videoList/id/' + id)
}

//栏目删除单个关联视频
export function videoRelieve(data, id) {
  return request.post('/admin/topic/videoRelieve/id/' + id,data)
}

//栏目增加单个关联视频
export function videoRelation(data, id) {
  return request.post('/admin/topic/videoRelation/id/' + id,data)
}

//栏目下单个关联视频设置免费
export function videoFree(data, id) {
  return request.post('/admin/topic/videoFree/id/' + id,data)
}

